home *** CD-ROM | disk | FTP | other *** search
- Path: castle.nando.net!news
- From: actuary@nando.net (Bill McCarthy)
- Newsgroups: comp.lang.c
- Subject: Re: Rounding a double
- Date: 2 Apr 1996 01:25:53 GMT
- Organization: Nando.net Public Access
- Message-ID: <4jpvn1$h2p@castle.nando.net>
- References: <4jprh2$1li@newsgate.dircon.co.uk>
- Reply-To: actuary@nando.net (Bill McCarthy)
- NNTP-Posting-Host: vyger1409.nando.net
- X-Newsreader: IBM NewsReader/2 v1.2
-
- In <4jprh2$1li@newsgate.dircon.co.uk>,
- pg-smith@dircon.co.uk (Peter Smith) writes:
-
- >Has anybody got a C function to round a double to a number of decimal
- >places that:
- >a) is readable
- >b) is relatively short
- >c) works !!
- >I had a function but it failed if the number of decimal places was zero,
- >if the double was very small, .. . etc etc.
-
- You forgot to post the code.
-
- Bill McCarthy
- actuary@nando.net
- Wendell, NC USA
-
-